/**  
 * @Title: JobInfoBO.java
 * @Description: TODO(描述)
 * @author liuyi
 * @date 2023-06-26 08:31:09 
 */  
package com.fsxgt.datagrid.sys.bo;

import java.util.Collection;
import java.util.HashSet;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import lombok.Data;

/**  
 * @ClassName: JobInfoBO
 * @Description: TODO(描述)
 * @author liuyi
 * @date 2023-06-26 08:31:09 
*/
@Data
public class LoginBO implements UserDetails{


	private SysUserBO sysUserBO;
	private Collection<? extends GrantedAuthority> authorities= new HashSet<SimpleGrantedAuthority>();
	
	
	public LoginBO(SysUserBO sysUserBO) {
		this.sysUserBO=sysUserBO;
	}
	



	@Override
	public Collection<? extends GrantedAuthority> getAuthorities() {
		// TODO Auto-generated method stub
		return this.authorities;
	}


	@Override
	public String getPassword() {
		// TODO Auto-generated method stub
		return sysUserBO.getPassword();
	}


	@Override
	public String getUsername() {
		// TODO Auto-generated method stub
		return sysUserBO.getUsername();
	}
	
	public Long getId() {
		// TODO Auto-generated method stub
		return sysUserBO.getId();
	}


	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}


	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}

 
	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}


	@Override
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}
	


	

	



}
